package cn.chrisn.chainOfResponsibility;

/**
 * @Description
 * @Author Chrisn
 * @Date 2025/4/30
 */
public class chainOfResponsibility {
    public static void main(String[] args) {
        Handler leader = new Leader();
        Handler superLeader = new SuperLeader();
        Handler boss = new Boss();
        leader.setNextHandler(superLeader);
        superLeader.setNextHandler(boss);
        leader.process(5);
        System.out.println("---------------");
        leader.process(30);
        System.out.println("---------------");
        leader.process(90);
    }
}
